import request from "@/utils/request";

export function listWorker(data) {
    return request({
        url: '/wbzj-user/worker/getPageList',
        method: 'post',
        data: data
    })
}

/**
 * 详情
 * @param prdId
 * @returns {AxiosPromise}
 */
export function getWorkerById(query) {
    return request({
        url: '/wbzj-user/worker/getWorkerById',
        method: 'get',
        params: query
    })
}

/**
 * 服务技能
 * @param query
 * @returns {AxiosPromise}
 */
export function getWorkerProdProj(query) {
    return request({
        url: '/wbzj-user/worker/getProdProj',
        method: 'get',
        params: query
    })
}
/**
 * 服务技能
 * @param query
 * @returns {AxiosPromise}
 */
export function getWorkerProjItemList(query) {
    return request({
        url: '/wbzj-user/worker/getProjItemList',
        method: 'get',
        params: query
    })
}

/**
 * 服务区域
 * @param query
 * @returns {AxiosPromise}
 */
export function getWorkerWorkArea(query) {
    return request({
        url: '/wbzj-user/worker/getWorkareList',
        method: 'get',
        params: query
    })
}

/**
 * 钱包
 * @param prdId
 * @returns {AxiosPromise}
 */
export function getWalletById(query) {
    return request({
        url: '/wbzj-biz/workerPay/getWallet',
        method: 'get',
        params: query
    })
}

/**
 * 审核通过
 * @param prdId
 * @returns {AxiosPromise}
 */
export function auditPass(data) {
    return request({
        url: '/wbzj-user/worker/auditPass',
        method: 'post',
        data:data
    })
}

/**
 * 审核不通过
 * @param prdId
 * @returns {AxiosPromise}
 */
export function auditNoPass(data) {
    return request({
        url: '/wbzj-user/worker/auditNoPass',
        method: 'post',
        data: data
    })
}

/**
 * 冻结
 * @param data
 * @returns {AxiosPromise}
 */
export function freeze(data) {
    return request({
        url: '/wbzj-user/worker/freeze',
        method: 'post',
        data: data
    })
}

/**
 * 解冻
 * @param data
 * @returns {AxiosPromise}
 */
export function unfreeze(data) {
    return request({
        url: '/wbzj-user/worker/unfreeze',
        method: 'post',
        data: data
    })
}

export function saveWorkerRelInfo(data) {
    return request({
        url: '/wbzj-user/worker/saveWorkerRelInfo',
        method: 'post',
        data: data
    })
}